php reset array keys

65

php remove array element reset keys -

unset($foo[0]); // remove item at index 0
$foo2 = array_values($foo); // 'reindex' array

reset array keys php -

foreach($input as &$val) {
   $val = array_values($val);
}

Comments

Submit
0 Comments